package xin.mashibo.pattern.facade;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * @author MaShibo
 * 日期 :  2019/1/24
 */
public class Database {


    private Database() {
    }

    public static Properties getProperties(String dbname) {
        String fileName = dbname + ".txt";
        Properties prop = new Properties();
        try {
            prop.load(new FileInputStream(fileName));
        } catch (IOException e) {
            System.out.println("Warning: " + fileName + " is not found.");
        }
        return prop;
    }

}
